package com.devbobcorn.nekoration.items;

import javax.annotation.Nonnull;

import com.devbobcorn.nekoration.client.event.PhotoEvents;

import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.world.World;

public class CameraItem extends Item {
    

    public CameraItem(Properties settings) {
        super(settings);
    }

    @Nonnull
    @Override
    public ActionResult<ItemStack> use(World world, PlayerEntity player, @Nonnull Hand hand) {
        
        ItemStack stack = player.getItemInHand(hand);
        if (world.isClientSide) {
            PhotoEvents.shouldTakePhoto = true;
        }
        return ActionResult.success(stack);
    }
}
